package co.sanduche.teach.service;

import android.content.Context;
import co.sanduche.teach.gallery.GalleryDBOpenHelper;
import co.sanduche.teach.service.ServiceManager.ServiceBinder;

public class UpdatePhotoTask extends TaskExecutor {

	protected long id;
	protected GalleryDBOpenHelper dbHelper;
	private ServiceBinder binder;

	@Override
	public void init(Context context, ServiceBinder binder, Task t) {
		this.id = t.getEntityId();
		dbHelper = new GalleryDBOpenHelper(context);
		this.binder = binder;
	}

	@Override
	public void execute() throws Exception {
		// ImageItem ii = dbHelper.get(id);
		// Log.i("Test1", "Voy a subir imagen: " + ii);
		// Photo p = new Photo();
		// p.setDescription(ii.getMessage());
		// EPFuture<Photo> future = EPFuture.newFuture();
		// EndPoints.PostsEP.updateDescription(ii.getServerId(), p, future);
		// future.get(10, TimeUnit.SECONDS);
		// binder.showMessage("Guardado");
	}

}
